/**
 * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.vijayan.profile.service.http;

import com.liferay.portal.kernel.json.JSONArray;
import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject;

import com.vijayan.profile.model.Horoscope;

import java.util.List;

/**
 * @author    vijayan
 * @generated
 */
public class HoroscopeJSONSerializer {
	public static JSONObject toJSONObject(Horoscope model) {
		JSONObject jsonObj = JSONFactoryUtil.createJSONObject();

		jsonObj.put("horoscopeId", model.getHoroscopeId());
		jsonObj.put("profileId", model.getProfileId());
		jsonObj.put("suryan", model.getSuryan());
		jsonObj.put("chandra", model.getChandra());
		jsonObj.put("kuja", model.getKuja());
		jsonObj.put("budha", model.getBudha());
		jsonObj.put("guru", model.getGuru());
		jsonObj.put("sukra", model.getSukra());
		jsonObj.put("sani", model.getSani());
		jsonObj.put("rahu", model.getRahu());
		jsonObj.put("ketu", model.getKetu());
		jsonObj.put("mandhi", model.getMandhi());
		jsonObj.put("lagna", model.getLagna());

		return jsonObj;
	}

	public static JSONArray toJSONArray(
		com.vijayan.profile.model.Horoscope[] models) {
		JSONArray jsonArray = JSONFactoryUtil.createJSONArray();

		for (Horoscope model : models) {
			jsonArray.put(toJSONObject(model));
		}

		return jsonArray;
	}

	public static JSONArray toJSONArray(
		com.vijayan.profile.model.Horoscope[][] models) {
		JSONArray jsonArray = JSONFactoryUtil.createJSONArray();

		for (Horoscope[] model : models) {
			jsonArray.put(toJSONArray(model));
		}

		return jsonArray;
	}

	public static JSONArray toJSONArray(
		List<com.vijayan.profile.model.Horoscope> models) {
		JSONArray jsonArray = JSONFactoryUtil.createJSONArray();

		for (Horoscope model : models) {
			jsonArray.put(toJSONObject(model));
		}

		return jsonArray;
	}
}